package top.fangw.admin.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.fangw.admin.service.ISysApplicationService;
import top.fangw.common.api.vo.InitTenantApplication;
import top.fangw.common.core.result.Result;

/**
 * <p>
 * 用途：存储各个应用信息 前端控制器
 * </p>
 *
 * @author fangw
 * @since 2024-03-02
 */
@Tag(name = "应用信息管理")
@RestController
@RequestMapping("/sys-application")
@RequiredArgsConstructor
public class SysApplicationController {
    private final ISysApplicationService sysApplicationService;

    @Operation(summary = "初始化租户应用信息")
    @PostMapping("/initTenantApplication")
    public Result<?> initTenantApplication(@RequestBody InitTenantApplication initTenantApplication){
        sysApplicationService.initTenantApplication(initTenantApplication);
        return Result.success();
    }

}
